﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.HRM
{
    [DataContract, Table("HrmMasAmphur")]
    public class MasAmphur
    {
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [DataMember, Display(Name = "AmphurId", ResourceType = typeof(Resources.MasAmphurResource))]
        public int AmphurId { get; set; }

        [ForeignKey("MasProvince")]
        [DataMember, Display(Name = "ProvinceId", ResourceType = typeof(Resources.MasAmphurResource))]
        public int? ProvinceId { get; set; }

        [DataMember, Display(Name = "Code", ResourceType = typeof(Resources.MasAmphurResource))]
        public string Code { get; set; }

        [DataMember, Display(Name = "Name", ResourceType = typeof(Resources.MasAmphurResource))]
        public string Name { get; set; }

        [DataMember, Display(Name = "NameEng", ResourceType = typeof(Resources.MasAmphurResource))]
        public string NameEng { get; set; }

        [DataMember]
        public string RecordStatus { get; set; }

        public int? CreatedBy { get; set; }
        public DateTime? CreatedWhen { get; set; }
        public int? UpdatedBy { get; set; }
        public DateTime? UpdatedWhen { get; set; }

        [DataMember]
        public virtual MasProvince MasProvince { get; set; }

        [DataMember]
        public virtual ICollection<MasDistrict> MasDistricts { get; set; }
    }
}
